package com.gs.SynAntiWandering.model;


import com.gs.SynAntiWandering.callback.Callback;
import com.gs.SynAntiWandering.constant.AllConstants;
import com.gs.SynAntiWandering.model.listener.OnResultListener;
import com.gs.SynAntiWandering.util.OKHttpUtil;
import com.gs.SynAntiWandering.util.SPUtil;

import java.lang.reflect.Type;

public class TagModel {
    public void getTag(String memberId, final OnResultListener onResultListener, Type typeofT){
        OKHttpUtil.getInstance().getAsync(OKHttpUtil.NET_URL + "/api/members/tagNums?memberId="+memberId+"&siteId="+ SPUtil.getInstance().getString(AllConstants.SITE_ID),
                new Callback() {
                    @Override
                    public void onSuccess(Object obj) {
                        onResultListener.onSuccess(obj);
                    }

                    @Override
                    public void onFailed(Exception e) {
                        onResultListener.onFails(e);
                    }
                },typeofT);
    }
}
